package edu.ctbu.labtest.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;

@Component
@Aspect
@Slf4j
public class HttpAspect {
    @Pointcut("execution(public * edu.ctbu.labtest.webapi.StudentRestController.get(..))")
    public void log(){

    }

    @AfterReturning(returning = "object",pointcut = "log()")
    public void After(Object object){
        log.info("response:{},",object);
        //System.out.println("日志输出");
    }
}
